var Koa = require("koa");
// 1.导入koa-router
var router = require("./routes");
var app = new Koa(); 

var koaStatic = require("koa-static");
app.use(koaStatic(__dirname + "/public"));

// 4.使路由生效
app.use(router.routes());

app.listen(3000, () => {
  console.log("服务已启动，在 http://localhost:3000/");
});
